package com.burgeon.backend.Rest.store;

/*
 * 修改vip标签
 */

import com.burgeon.backend.Rest.base.RESTBase;
import org.springframework.util.MultiValueMap;

import java.util.HashMap;

public class ModStore extends RESTBase {

    private String ip;
    private String account;
    private String password;

    public ModStore(String ip, String account, String password) {
        this.ip = ip;
        this.account = account;
        this.password = password;
    }

    /**
     * 发送并接收字符创
     */

    public void getData(String id, String map,String imgUrl) throws Exception {
        String url = "http://" + ip + "/servlets/binserv/Rest";
        String str = RESULT(Data(id, map,imgUrl), url);

    }

    private MultiValueMap Data(String id, String map,String imgUrl) {

        HashMap params = new HashMap();

        params.put("ID", id);
        params.put("partial_update", "true");
        params.put("table", "C_STORE");//表名
        params.put("IMGURL","'"+imgUrl+"'");
        params.put("MAP", "'"+map+"'");
        return DATA("ObjectModify", params, account, password);
    }

    public static void main(String[] args) {
        ModStore g = new ModStore("59.110.28.94:90", "nea@burgeon.com.cn", "burgeon55321");
        try {
            g.getData("3140", "123","123");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
